<template>
  <el-dialog title="司机订单列表详情"   width="80%"   :visible.sync="showDriverOrderDetail" >
    <div class="app-container">
          <el-table :data="list">
              <el-table-column label="订单号" prop="orderNo" min-width="120px" ></el-table-column>
              <el-table-column label="车牌号" prop="carNo" ></el-table-column>
              <el-table-column label="客户名称" prop="memberName"></el-table-column>
              <el-table-column label="代驾费" prop="valetDrivingFee"></el-table-column>
              <el-table-column label="租赁开始时间" prop="rentalStartTime"></el-table-column>
              <el-table-column label="租赁结束时间" prop="rentalEndTime"></el-table-column>
            <el-table-column label="订单创建时间" prop="createTime"></el-table-column>
          </el-table>
          <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize" @pagination="getList" />
      </div>
  </el-dialog>
</template>

<script>
import * as api from '@/api/charteredBus/performance'

export default {
  props: ['driverId'],
  data() {
    return {
      list: [],
      driverId:null,
      queryParams: {
          driverId: null,
          pageNum: 0,//页码   必选
          pageSize: 10,//每页显示数据 必选
      },
      showDriverOrderDetail:false,
      total: 0,
    };
  },
  mounted() {
  },
  methods: {
    getList() {
      this.queryParams.driverId = this.driverId;
      api.driverOrderList({
          ...this.queryParams,
      }).then(response => {
          this.list = response.rows || [];
      });
    },
    show(driverId){
      this.showDriverOrderDetail = true;
      this.driverId=driverId;
      this.getList();
    }

  },
}
</script>
